home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / fgl110c.zip / 05-10.C < prev    next >
Text File  |  1992-01-31  |  383b  |  29 lines

  1. #include <fastgraf.h>
  2.  
  3. void main(void);
  4.  
  5. #define COLORS 256
  6.  
  7. void main()
  8. {
  9.    int base;
  10.    int color;
  11.    int mode;
  12.    int x;
  13.  
  14.    mode = fg_getmode();
  15.    fg_setmode(19);
  16.  
  17.    x = 0;
  18.  
  19.    for (color = 0; color < COLORS; color++) {
  20.       fg_setcolor(color);
  21.       fg_rect(x,x,0,199);
  22.       x++;
  23.       }
  24.    fg_waitkey();
  25.  
  26.    fg_setmode(mode);
  27.    fg_reset();
  28. }
  29.